package ${packageName}.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${packageName}.entity.${entityName};
<#if dtoFlag=='Y'>
import ${packageName}.dto.${entityName}DTO;
</#if>

import java.util.List;

/**
* @author Faye.Wang
* @version 1.0
* @date 2021/1/6 14:49
* @Description
*/
public interface I${entityName}Service {
	/**
	* 保存数据
	* @param entity
	*/
	void insertEntity(${entityName} entity);

	/**
	* 获取单条数据
	* @param id
	* @return
	*/
<#if dtoFlag=='N'>
	${entityName} selectByPrimaryKey(Integer id);
<#else>
	${entityName}DTO selectByPrimaryKey(Integer id);
</#if>
	/**
	* 根据主键删除数据
	* @param id
	* @return
	*/
	void deletePrimaryKey(Integer id);

	/**
	* 单表查询所有
	* @param entity
	* @return
	*/
<#if singleSqlFlag ==true>
	IPage<${entityName}DTO> selectEntityList(Page<${entityName}DTO> page,${entityName} entity);
		<#else>
	IPage<${entityName}> selectEntityList(Page<${entityName}> page,${entityName} entity);
</#if>
	/**
	* 修改记录
	* @param entity
	*/
	void updateEntity(${entityName} entity);


}
